﻿using System.Collections.Generic;
using Castle.ActiveRecord;

namespace BusinessModels
{
    [ActiveRecord]
    public class Director2 : ActiveRecordBase
    {
        private int _id;

        private string _stringTest;

        [PrimaryKey]
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        [Property]
        public string Name
        {
            get { return _stringTest; }
            set { _stringTest = value; }
        }
    }

    [ActiveRecord]
    public class Director : ActiveRecordBase<Director>
    {
        private int _id;

        private string _stringTest;

        private IList<Movie> _list = new List<Movie>();

        public Director()
        {

        }

        [PrimaryKey]
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        [Property]
        public string Name
        {
            get { return _stringTest; }
            set { _stringTest = value; }
        }

        [HasMany]
        public IList<Movie> Movies
        {
            get { return _list; }
            set { _list = value; }
        }

    }

}
